const key = '0813d396bfb64f752134f75ac231a694';
const baseUrl = `http://v.juhe.cn`;

export const getNews = async (type = 'junshi') => {
	const url = `${baseUrl}/toutiao/index?key=${key}&type=${type}`;
	console.log(url)
	try {
		const res = await (await fetch(url, {
			method: 'GET'
		})).json();
		console.log(res);
		if (res.error_code === 0) {
			return res.result.data;
		} else {
			return [
				{
					uniquekey: '9ae99fb906f1de6f246dd359695188d4',
					title: '第二十五批赴刚果(金)维和工兵分队举行祭奠付清礼烈士仪式',
					date: '2022-04-04 18:52:00',
					category: '军事',
					author_name: '人民资讯',
					url: 'https://mini.eastday.com/mobile/220404185237318368399.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/news/20220404/20220404185237_614efa02a556da80152bd4f9ff083d6e_1_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: '59d89aa8c4a078e1ebf034f1c828f957',
					title: '中国第八批赴南苏丹（朱巴）维和步兵营举行清明纪念仪式',
					date: '2022-04-04 18:52:00',
					category: '军事',
					author_name: '人民资讯',
					url: 'https://mini.eastday.com/mobile/220404185236188261082.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/news/20220404/20220404185236_f90148b1e956f43d80d3df82b1331111_1_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: 'ff5acabbf928ea65ad9d6a00bd578636',
					title: '驻英使馆驳斥：一派胡言！',
					date: '2022-04-04 16:33:00',
					category: '军事',
					author_name: '上观新闻',
					url: 'https://mini.eastday.com/mobile/220404163332606165364.html',
					thumbnail_pic_s: '',
					is_content: '1'
				},
				{
					uniquekey: '14cd423f72f77cf0ac6c299893a973bc',
					title: '最闪亮的坐标丨新时代军队勋章奖章纪念章长啥样',
					date: '2022-04-04 15:34:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404153405231585628.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/minimodify/20220404/750x9922_624a9f6bcc116_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: '270f78c4152a72ed1292a27fa2c8f328',
					title: '第80集团军某陆航旅：数字化智慧系统提升练兵质效',
					date: '2022-04-04 15:32:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404153203792152908.html',
					thumbnail_pic_s: '',
					is_content: '1'
				},
				{
					uniquekey: 'ee2f3acb68763555c5b587b5461aa30d',
					title: '家国清明 部队官兵多种形式祭奠先烈 从英烈精神中汲取奋进动力',
					date: '2022-04-04 15:31:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404153102225947196.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/minimodify/20220404/800x418_624a9eb5b41b4_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: '6e0c0328db99734293ac344ccdfc3166',
					title: '赓续前行是最好的纪念',
					date: '2022-04-04 15:30:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404153037499735691.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/minimodify/20220404/677x929_624a9e9d0afb3_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: '84055761da9377524bdecace2a11c00c',
					title: '加紧锻造打赢现代化战争能力系列谈：鼓足敢打必胜的精气神',
					date: '2022-04-04 15:30:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404153004793858500.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/minimodify/20220404/675x929_624a9e7c4ca29_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: '186bf885d72e13af56af4ec54fda554d',
					title: '第71集团军某旅驻训官兵开展“‘云端’祭英烈”活动',
					date: '2022-04-04 15:29:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404152928298267673.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/minimodify/20220404/674x926_624a9e57b53f6_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: 'd5114cf05a991dfbf10520e310b96752',
					title: '走进那片熟悉的蓝色海域，父亲的目光激励他远航深蓝',
					date: '2022-04-04 15:29:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404152905419853282.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/minimodify/20220404/1140x1140_624a9e40d8630_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: '0f185d74e3a2b1f0ac3405829592ade8',
					title: '组图丨第78集团军某旅用董存瑞精神铸魂育人掠影',
					date: '2022-04-04 15:28:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404152832685458006.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/minimodify/20220404/1140x717_624a9e201ef76_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: '5d8871f96950b4f1f5969f6a4faf6cee',
					title: '陆军某部对新兵多措并举开展心理训练，以“心训”促新训',
					date: '2022-04-04 15:28:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404152801889374291.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/minimodify/20220404/800x470_624a9e013aea2_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: 'e7e9476cc3d8bed2783037ff1e8b08f4',
					title: '第74集团军某旅模拟训练平台加快人才成长提升训练质效',
					date: '2022-04-04 15:27:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404152740180754800.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/minimodify/20220404/675x926_624a9deb7bb6b_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: 'bb3179361cd9ca2168c37fb560a9e1ce',
					title: '东部战区陆军某旅：用空情模拟系统专攻精练提升训练效益',
					date: '2022-04-04 15:27:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404152711109848911.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/minimodify/20220404/675x928_624a9dce91880_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: 'eaa6ae2d346e06aa1b8b4eae3ff23386',
					title: '退役军人事务部印发通知部署稳妥开展烈士遗骸搜寻发掘鉴定保护工',
					date: '2022-04-04 15:26:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404152645347912443.html',
					thumbnail_pic_s: '',
					is_content: '1'
				},
				{
					uniquekey: 'c5ab604cae194eeb6ec99a5667640351',
					title: '解放军报评论员：构建健全完善的士兵退役制度',
					date: '2022-04-04 15:26:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404152620116849375.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/minimodify/20220404/674x928_624a9d9b8156e_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: '8665705980de9f9079e954e0c8531fe2',
					title: '英国将在2050年前新建七座核电站',
					date: '2022-04-04 15:21:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404152133578829450.html',
					thumbnail_pic_s: '',
					is_content: '1'
				},
				{
					uniquekey: 'abf4d74568b0496bc49014a5f5abd3b4',
					title: '弃投率走高：法国总统大选的隐忧',
					date: '2022-04-04 15:20:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404152057669215499.html',
					thumbnail_pic_s: '',
					is_content: '1'
				},
				{
					uniquekey: '24ee99d15f1c4ea473f6ea74d583835e',
					title: '泰国军方与南部分离势力组织开始执行停火协议',
					date: '2022-04-04 15:19:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404151949019243493.html',
					thumbnail_pic_s: '',
					is_content: '1'
				},
				{
					uniquekey: 'cc8300de6b586404c72d76aac660a766',
					title: '美国“冷战妄想症”的迷思',
					date: '2022-04-04 15:17:00',
					category: '军事',
					author_name: '锋行天下',
					url: 'https://mini.eastday.com/mobile/220404151739499219408.html',
					thumbnail_pic_s: '',
					is_content: '1'
				},
				{
					uniquekey: '73e246685018baf4550720612100422d',
					title: '“当前，美国开辟了三大战线”',
					date: '2022-04-04 13:41:00',
					category: '军事',
					author_name: '上观新闻',
					url: 'https://mini.eastday.com/mobile/220404134147293838353.html',
					thumbnail_pic_s: '',
					is_content: '1'
				},
				{
					uniquekey: '1f5ad47af91c3ce1e13a8dfc3624e7da',
					title: '致敬！沙画讲述献身禁毒事业的英雄父子',
					date: '2022-04-04 11:45:00',
					category: '军事',
					author_name: '人民资讯',
					url: 'https://mini.eastday.com/mobile/220404114512832460375.html',
					thumbnail_pic_s: '',
					is_content: '1'
				},
				{
					uniquekey: 'd74621e3c4c6d670ac16263423edd2dd',
					title: '【最闪亮的坐标】贵州武警缅怀“雷锋式的好战士”李学章',
					date: '2022-04-04 11:35:00',
					category: '军事',
					author_name: '人民资讯',
					url: 'https://mini.eastday.com/mobile/220404113530518884249.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/news/20220404/20220404113530_e46fcd11bdca9dbde8e255efe819e8fc_1_mwpm_03201609.jpeg',
					thumbnail_pic_s02:
						'https://dfzximg02.dftoutiao.com/news/20220404/20220404113530_e46fcd11bdca9dbde8e255efe819e8fc_2_mwpm_03201609.jpeg',
					thumbnail_pic_s03:
						'https://dfzximg02.dftoutiao.com/news/20220404/20220404113530_e46fcd11bdca9dbde8e255efe819e8fc_3_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: '665fe750b7e346548a7a95a4fb73fcd4',
					title: '等你们回家！回顾太空出差三人组名场面',
					date: '2022-04-04 10:38:00',
					category: '军事',
					author_name: '人民资讯',
					url: 'https://mini.eastday.com/mobile/220404103843605330361.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/news/20220404/20220404103843_aca362f01fe27c7578665d96483834e0_1_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: '272c350d61ca8ebe4a2f59ade4883344',
					title: '北约秘书长：数万乌军接受过北约训练 美英参与多年',
					date: '2022-04-04 10:05:00',
					category: '军事',
					author_name: '人民资讯',
					url: 'https://mini.eastday.com/mobile/220404100530486957277.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/news/20220404/20220404100530_1bdaf27f5f171dce342f04081226408f_1_mwpm_03201609.jpeg',
					thumbnail_pic_s02:
						'https://dfzximg02.dftoutiao.com/news/20220404/20220404100530_1bdaf27f5f171dce342f04081226408f_2_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: 'c3e395f76e86c26fd267bd3cd4a2864b',
					title: '形形色色的西方“雇佣兵”蜂拥而至，是人道主义援助还是搅动战争？',
					date: '2022-04-04 09:47:00',
					category: '军事',
					author_name: '上观新闻',
					url: 'https://mini.eastday.com/mobile/220404094736720779087.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/news/20220404/20220404094736_577e505e2a5cf7c1d5474840a6b85c48_1_mwpm_03201609.jpeg',
					thumbnail_pic_s02:
						'https://dfzximg02.dftoutiao.com/news/20220404/20220404094736_577e505e2a5cf7c1d5474840a6b85c48_2_mwpm_03201609.jpeg',
					thumbnail_pic_s03:
						'https://dfzximg02.dftoutiao.com/news/20220404/20220404094736_577e505e2a5cf7c1d5474840a6b85c48_3_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: 'aecabc03cbfc334f7f66c354c3c8816f',
					title: '被毁全球最大运输机安-225最新画面曝光',
					date: '2022-04-04 09:18:00',
					category: '军事',
					author_name: '人民资讯',
					url: 'https://mini.eastday.com/mobile/220404091852800145572.html',
					thumbnail_pic_s: '',
					is_content: '1'
				},
				{
					uniquekey: '1ff9bf2849ac605f800a8518a99e381c',
					title: '乌克兰：已控制整个基辅州，今年GDP可能下降40%！3个国家源俄天然气供应已中断',
					date: '2022-04-04 08:37:00',
					category: '军事',
					author_name: '上观新闻',
					url: 'https://mini.eastday.com/mobile/220404083726249915877.html',
					thumbnail_pic_s: '',
					is_content: '1'
				},
				{
					uniquekey: 'f472b19eb43e81870b84891294f7fd60',
					title: '讲武谈兵｜加紧备战：从新财年预算申请看美空军的未来转型',
					date: '2022-04-04 08:06:00',
					category: '军事',
					author_name: '澎湃新闻',
					url: 'https://mini.eastday.com/mobile/220404080606104475711.html',
					thumbnail_pic_s:
						'https://dfzximg02.dftoutiao.com/news/20220404/20220404080606_d854b9829634ec405e5467df84af12f9_1_mwpm_03201609.jpeg',
					thumbnail_pic_s02:
						'https://dfzximg02.dftoutiao.com/news/20220404/20220404080606_d854b9829634ec405e5467df84af12f9_2_mwpm_03201609.jpeg',
					thumbnail_pic_s03:
						'https://dfzximg02.dftoutiao.com/news/20220404/20220404080606_d854b9829634ec405e5467df84af12f9_3_mwpm_03201609.jpeg',
					is_content: '1'
				},
				{
					uniquekey: '6045afbfd923993dfb2b52748d037921',
					title: '解放军支援上海！',
					date: '2022-04-04 06:28:00',
					category: '军事',
					author_name: '人民资讯',
					url: 'https://mini.eastday.com/mobile/220404062854251529609.html',
					thumbnail_pic_s: '',
					is_content: '1'
				}
			];
		}
	} catch (err) {
		console.log('Error:', err);
	}
};
